<?php
/**
* Extracts image id from the cover image
*/
function smarty_modifier_imageid($coverimage='')
{
	$parts = preg_split('/[\\|\/]+/is', str_replace('.jpg', '', $coverimage));
	if(!$parts)
	{
		# One element with zero value?
		$parts = array(0);
	}
	return $parts[count($parts)-1];
}
?>